-- GENERATED SPELL FOR [Skettis Wing Guard] --


function spell0_21644(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_21644', 30272, 1)
end

function spell1_21644(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21644', 622, 1)
end

function spell2_21644(pUnit, Event) --@Gushing Wound,n/a--
pUnit:FullCastSpellOnTarget(35321,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21644', 25000, 1)
end

function spell3_21644(pUnit, Event) --@Retaliation,Self--
pUnit:FullCastSpellOnTarget(40546,pUnit)
pUnit:RegisterEvent('Sorts_21644', 5285, 1)
end

function Sorts_21644(pUnit, Event)
local choix_sorts_21644 = math.random(0, 3)
if choix_sorts_21644 == 0 then
pUnit:RegisterEvent('spell0_21644', 1, 1)
end
if choix_sorts_21644 == 1 then
pUnit:RegisterEvent('spell1_21644', 1, 1)
end
if choix_sorts_21644 == 2 then
pUnit:RegisterEvent('spell2_21644', 1, 1)
end
if choix_sorts_21644 == 3 then
pUnit:RegisterEvent('spell3_21644', 1, 1)
end
end

function mob21644_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21644', math.random(1500, 3000), 1)
end

function mob21644_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21644_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21644_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21644, 1, 'mob21644_Action')
RegisterUnitEvent(21644, 2, 'mob21644_Leave')
RegisterUnitEvent(21644, 3, 'mob21644_Kill')
RegisterUnitEvent(21644, 4, 'mob21644_Die')
